import Observer from "./Observer.js";

export default function observe(value) {
  let ob
  // 如果不是对象，什么都不做
  if (typeof value != 'object') {
    return
  }
  if (typeof value.__ob__ != "undefined") {
    ob = value.__ob__;
  } else {
    ob == new Observer(value);
  }
  return ob
}